package design.patterns.behavioral.state;

/**
 * @author gjx
 * @version v1.0
 * @Description
 * @date 2019/4/10 15:15
 */
public class RunHeroState extends HeroState {


    @Override
    public void run() {
        System.out.println("英雄正在在行走.....");
    }

    @Override
    public void attack() {
        System.out.println("英雄进行攻击....");
        hero.setRunState(Hero.attackHeroState);
    }

    @Override
    public void frozen() {
        System.out.println("英雄被冰冻了.....");
        hero.setRunState(Hero.frozenHeroState);
    }
}
